<?php
FLEA::loadClass('FLEA_Db_TableDataGateway');

class	Model_Matter	extends		FLEA_Db_TableDataGateway
{
	var		$tableName		=	'matter';
	var		$primaryKey		=	'MatterID';
	
	function findFirmMatters($firmID)
	{
		$sql	=	'select matter.*,client.Business,user.Email from matter , client , user ' .
				' where matter.FirmID='.$firmID.'  and  matter.ClientID=client.ClientID and client.UserID=user.UserID';
				
		return $this->findBySql($sql);
	}
}
?>